package com.apes.scm.stock.inventory.model;

import com.apes.framework.jpa.BaseModel;
import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.comment.Comment;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;

/**
 * 盘点表更新标识
 * @author linwz
 * @create 2020.6.30
 */
@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = InventoryMark.CONST_TABLE_NAME)
public class InventoryMark extends BaseModel {
    public static final String CONST_TABLE_NAME = "sto_inventory_mark";

    @Id
    @Column(name = "id",nullable = false, length = 64)
    private String id; // 盘点表更新标识

    @Column(name = "state_n", columnDefinition = "number(16) default 0")
    @Comment("状态标记")
    private int state = 0; //状态： ('0', '执行中'), ('1', '报错') , ('2', '成功')

}













